package org.baiyun.kaka.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.baiyun.kaka.dao.IVipDao;
import org.baiyun.kaka.entity.Vip;
import org.baiyun.kaka.service.IVipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("vipService")//告诉系统，我这是一个Service，叫vipService
@Transactional
public class VipServiceImpl implements IVipService {
    @Autowired//自动注入
    private IVipDao vipDao;
    
    
	public List<Vip> findAll() {
		return vipDao.findAll();//调用dao成的findALL方法
	}
	
	public Vip get(int id) {
		return vipDao.get(id);//直接调用dao的get方法完成数据查询
	}

	public boolean save(Vip vip) {
		return vipDao.save(vip);
	}

	@Override
	public boolean delete(int id) {
		return vipDao.delete(id);
	}

	@Override
	public boolean update(Vip vip) {
		return vipDao.update(vip);
	}
	
	

	
}
